%latex.default(object = result, title = "", file = paste0("tables/",     filename, ".tex"), label = paste0("tb_", type), caption = caption,     insert.bottom = note, first.hline.double = FALSE, rowname = rownames,     cgroup = c("$n = 200$", "", "$n = 1000$", "", "$n = 200$",         "", "$n = 1000$"), n.cgroup = c(2, 1, 2, 2, 2, 1, 2),     cgroupTexCmd = "", colheads = clabels, rgroup = c("Correct PS model",         "Misspecified PS model"), n.rgroup = c(rep(nrow(res1),         2)), longtable = FALSE, center = "centering")%
\begin{table}[!tbp]
\caption{Simulation results: Quadratic outcome model 1\label{tb_quad1}} 
{\centering
\begin{tabular}{lrrcrcrrcrrcrrcrcrr}
\hline
\multicolumn{1}{l}{\ }&\multicolumn{2}{c}{\ $n = 200$}&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 1000$}&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 200$}&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 1000$}\tabularnewline
\cline{2-3} \cline{7-8} \cline{13-14} \cline{18-19}
\multicolumn{1}{l}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}\tabularnewline
\hline
{\bfseries Correct PS model}&&&&&&&&&&&&&&&&&&\tabularnewline
~~\textbf{nDBW}&$-2.26$&$  6.28$&&$$&&$-0.55$&$  2.81$&&$$&$$&&$-0.45$&$ 5.77$&&$$&&$-0.21$&$ 2.62$\tabularnewline
~~MLE&$-0.78$&$ 18.19$&&$$&&$-0.06$&$  8.02$&&$$&$$&&$-0.21$&$14.70$&&$$&&$ 0.00$&$ 5.60$\tabularnewline
~~CBPS&$ 1.24$&$  7.26$&&$$&&$ 0.24$&$  3.34$&&$$&$$&&$ 2.05$&$ 7.21$&&$$&&$ 0.32$&$ 2.92$\tabularnewline
~~Calibrated weighting&$-1.55$&$  6.33$&&$$&&$-0.37$&$  2.97$&&$$&$$&&$-0.75$&$ 5.78$&&$$&&$-0.22$&$ 2.57$\tabularnewline
~~Entropy balancing&$-3.74$&$  6.92$&&$$&&$-3.03$&$  4.04$&&$$&$$&&$-3.47$&$ 6.50$&&$$&&$-3.06$&$ 3.91$\tabularnewline
~~True propensity score&$-0.17$&$ 30.73$&&$$&&$ 0.54$&$ 14.26$&&$$&$$&&$-0.60$&$25.64$&&$$&&$-0.31$&$11.65$\tabularnewline
~~Unweighted&$-6.85$&$  8.93$&&$$&&$-6.91$&$  7.36$&&$$&$$&&$ 7.16$&$ 9.77$&&$$&&$ 6.94$&$ 7.52$\tabularnewline
~~\textbf{nDBW DR}&$-2.16$&$  6.08$&&$$&&$-0.48$&$  2.66$&&$$&$$&&$-0.86$&$ 5.67$&&$$&&$-0.20$&$ 2.53$\tabularnewline
~~MLE DR&$-1.43$&$  7.45$&&$$&&$-0.31$&$  3.53$&&$$&$$&&$-0.53$&$ 6.95$&&$$&&$-0.14$&$ 2.96$\tabularnewline
~~CBPS DR&$-1.58$&$  6.63$&&$$&&$-0.39$&$  3.11$&&$$&$$&&$-0.55$&$ 6.18$&&$$&&$-0.14$&$ 2.79$\tabularnewline
~~Calibrated weighting DR&$-1.78$&$  6.15$&&$$&&$-0.45$&$  2.81$&&$$&$$&&$-0.64$&$ 5.74$&&$$&&$-0.17$&$ 2.56$\tabularnewline
~~Entropy balancing DR&$-3.68$&$  6.86$&&$$&&$-2.72$&$  3.79$&&$$&$$&&$-2.13$&$ 5.92$&&$$&&$-1.67$&$ 2.94$\tabularnewline
~~True propensity score DR~~&$-1.63$&$  7.58$&&$$&&$-0.30$&$  3.71$&&$$&$$&&$-0.78$&$ 6.88$&&$$&&$-0.22$&$ 3.15$\tabularnewline
~~Imputation&$-5.81$&$  8.39$&&$$&&$-5.03$&$  5.72$&&$$&$$&&$-2.89$&$ 6.78$&&$$&&$-2.73$&$ 3.81$\tabularnewline
\hline
{\bfseries Misspecified PS model}&&&&&&&&&&&&&&&&&&\tabularnewline
~~\textbf{nDBW}&$-3.28$&$  6.61$&&$$&&$-1.88$&$  3.11$&&$$&$$&&$ 1.69$&$ 6.42$&&$$&&$ 0.24$&$ 2.68$\tabularnewline
~~MLE&$34.36$&$244.59$&&$$&&$80.25$&$611.06$&&$$&$$&&$-1.47$&$13.75$&&$$&&$-1.46$&$ 5.38$\tabularnewline
~~CBPS&$ 2.53$&$  7.42$&&$$&&$ 1.01$&$  3.17$&&$$&$$&&$ 5.40$&$ 9.63$&&$$&&$ 2.23$&$ 3.91$\tabularnewline
~~Calibrated weighting&$-1.83$&$  6.22$&&$$&&$-0.43$&$  2.73$&&$$&$$&&$ 0.66$&$ 6.30$&&$$&&$ 1.07$&$ 2.87$\tabularnewline
~~Entropy balancing&$-3.63$&$  6.87$&&$$&&$-2.40$&$  3.59$&&$$&$$&&$-0.95$&$ 6.30$&&$$&&$-0.62$&$ 2.70$\tabularnewline
~~True propensity score&$ 0.29$&$ 30.65$&&$$&&$-0.23$&$ 14.00$&&$$&$$&&$ 0.27$&$26.02$&&$$&&$-0.15$&$12.01$\tabularnewline
~~Unweighted&$-6.95$&$  9.03$&&$$&&$-6.85$&$  7.30$&&$$&$$&&$ 6.85$&$ 9.42$&&$$&&$ 6.99$&$ 7.55$\tabularnewline
~~\textbf{nDBW DR}&$-1.89$&$  6.17$&&$$&&$-0.47$&$  2.66$&&$$&$$&&$ 0.32$&$ 6.24$&&$$&&$ 1.00$&$ 2.83$\tabularnewline
~~MLE DR&$ 1.71$&$ 25.10$&&$$&&$17.40$&$174.96$&&$$&$$&&$ 1.02$&$ 7.76$&&$$&&$ 1.34$&$ 3.51$\tabularnewline
~~CBPS DR/BRDR&$-2.04$&$  6.71$&&$$&&$-0.09$&$  3.13$&&$$&$$&&$ 1.32$&$ 7.02$&&$$&&$ 1.21$&$ 3.21$\tabularnewline
~~Calibrated weighting DR&$-1.83$&$  6.22$&&$$&&$-0.43$&$  2.73$&&$$&$$&&$ 0.65$&$ 6.30$&&$$&&$ 1.07$&$ 2.87$\tabularnewline
~~Entropy balancing DR&$-3.63$&$  6.87$&&$$&&$-2.40$&$  3.59$&&$$&$$&&$-0.95$&$ 6.30$&&$$&&$-0.62$&$ 2.70$\tabularnewline
~~True propensity score DR~~&$-1.57$&$  7.53$&&$$&&$-0.27$&$  3.68$&&$$&$$&&$-0.78$&$ 7.05$&&$$&&$-0.23$&$ 3.11$\tabularnewline
~~Imputation&$-5.76$&$  8.26$&&$$&&$-5.00$&$  5.67$&&$$&$$&&$-2.94$&$ 6.89$&&$$&&$-2.73$&$ 3.78$\tabularnewline
\hline
\end{tabular}}
\parbox{0.99\textwidth}
		{Notes: This simulation compares the performance of various methods 
		for estimating propensity scores and (inverse probability) weights 
		by investigating combinations of six versions of the true outcome model 
		(linear~1, linear~2, quadratic~1, quadratic~2, exponential~1, and exponential~2)
		and two versions of coefficients for the true propensity score model (type~A and B)
		with the two different numbers of observations ($n = 200$ and $n = 1000$).
		For each estimation method, I use two propensity score model specifications 
		(correct and misspecified) and report the bias and RMSE for each in the table.}\end{table}
